package com.eslag.test;

import com.eslag.rpc.annotation.Service;
import com.eslag.rpc.api.HelloObject;
import com.eslag.rpc.api.HelloService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 定义接口的实现类
 */
@Service
public class HelloServiceImpl implements HelloService {

    // 创建并初始化一个Logger对象，用于在RpcClient中记录日志（工厂方法
    private static final Logger logger = LoggerFactory.getLogger(HelloServiceImpl.class);
    @Override
    public String hello(HelloObject object) {
        logger.info("接收到消息：{}", object.getMessage());
        return "成功调用hello()方法";
    }
}

